﻿using UnityEngine;
using System.Collections;
using SimpleJSON;

public class main : MonoBehaviour {

	// Use this for initialization
	void Start () {

		Debug.Log("start ...");


		LocalizationRequestInfo req1 = new LocalizationRequestInfo("en_US", "navigation");
		ServerInfoRequestInfo req2 = new ServerInfoRequestInfo ();

		SmartSync.Sync("1005", "209035", new RequestInfo[]{req1, req2}, status =>
		{
			if (status)
			{
				var dict = SmartSync.GetLocalizedStrings("navigation");
				foreach (var v in dict.Values)
				{
					Debug.Log("val = " + v);
				}
				Debug.Log("api host == " + SmartSync.GetServerInfo().apiHost);
			}
			else
			{
				Debug.Log("sync has failed");
			}
		});

	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
